package com.yazi.mxz.common.entity.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * StoreGiftId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class StoreGiftId implements java.io.Serializable {

	// Fields

	private Long promoteId;
	private Long storeGoodsId;

	// Constructors

	/** default constructor */
	public StoreGiftId() {
	}

	/** full constructor */
	public StoreGiftId(Long promoteId, Long storeGoodsId) {
		this.promoteId = promoteId;
		this.storeGoodsId = storeGoodsId;
	}

	// Property accessors

	@Column(name = "PROMOTE_ID", nullable = false, precision = 15, scale = 0)
	public Long getPromoteId() {
		return this.promoteId;
	}

	public void setPromoteId(Long promoteId) {
		this.promoteId = promoteId;
	}

	@Column(name = "STORE_GOODS_ID", nullable = false, precision = 15, scale = 0)
	public Long getStoreGoodsId() {
		return this.storeGoodsId;
	}

	public void setStoreGoodsId(Long storeGoodsId) {
		this.storeGoodsId = storeGoodsId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof StoreGiftId))
			return false;
		StoreGiftId castOther = (StoreGiftId) other;

		return ((this.getPromoteId() == castOther.getPromoteId()) || (this.getPromoteId() != null
				&& castOther.getPromoteId() != null && this.getPromoteId().equals(
				castOther.getPromoteId())))
				&& ((this.getStoreGoodsId() == castOther.getStoreGoodsId()) || (this
						.getStoreGoodsId() != null && castOther.getStoreGoodsId() != null && this
						.getStoreGoodsId().equals(castOther.getStoreGoodsId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getPromoteId() == null ? 0 : this.getPromoteId().hashCode());
		result = 37 * result + (getStoreGoodsId() == null ? 0 : this.getStoreGoodsId().hashCode());
		return result;
	}

}